package com.tour.service.impl;

import com.tour.bean.ReturnT;
import com.tour.service.ManageService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * @ClassName ManageServiceImpl
 * @Author 张梦兴
 * @Date 2020/3/14 0:29
 * @describe
 */
@Service
public class ManageServiceImpl implements ManageService {

    private final Logger log=Logger.getLogger(ManageServiceImpl.class);

    @Value("${admin.username}")
    private String username;
    @Value("${admin.password}")
    private String password;

    @Override
    public ReturnT<String> vaildLogin(String userName, String password) {
        if(this.username.equals(userName) && this.password.equals(password)){
            return ReturnT.SUCCESS;
        }
        return ReturnT.FAIL;
    }
}
